\usepackage{etex}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage{graphicx}
\usepackage[usenames,x11names, dvipsnames, svgnames]{xcolor}
%\usepackage{amsmath,amssymb,amsthm}
\usepackage{dsfont}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{texshade}
\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  linkcolor=black,
  citecolor=blue,
  filecolor=black,
  urlcolor=DodgerBlue4,
  breaklinks=false,
  % linkbordercolor=red,% hyperlink borders will be red
  % pdfborderstyle={/S/U/W 1}% border style will be underline of width 1pt
}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{shapes,calc,shadows,fadings,arrows,decorations.pathreplacing,automata,positioning}
\usetikzlibrary{external}
\usetikzlibrary{decorations.text}
\tikzexternalize[prefix=./Figures/External/]% activate externalization!
\tikzexternaldisable
\usetikzlibrary{patterns}
\usetikzlibrary{decorations.markings}
\usepackage{mathtools}
\usepackage[group-separator={,}]{siunitx}
%% ## Equation Space Control---------------------------
\def\EQSP{3pt}
\newcommand{\mltlne}[2][\EQSP]{\begingroup\setlength\abovedisplayskip{#1}\setlength\belowdisplayskip{#1}\begin{equation}\begin{multlined} #2 \end{multlined}\end{equation}\endgroup\noindent}
\newcommand{\cgather}[2][\EQSP]{\begingroup\setlength\abovedisplayskip{#1}\setlength\belowdisplayskip{#1}\begin{gather} #2 \end{gather}\endgroup\noindent}
\newcommand{\cgathers}[2][\EQSP]{\begingroup\setlength\abovedisplayskip{#1}\setlength\belowdisplayskip{#1}\begin{gather*} #2 \end{gather*}\endgroup\noindent}
\newcommand{\calign}[2][\EQSP]{\begingroup\setlength\abovedisplayskip{#1}\setlength\belowdisplayskip{#1}\begin{align} #2 \end{align}\endgroup\noindent}
\newcommand{\caligns}[2][\EQSP]{\begingroup\setlength\abovedisplayskip{#1}\setlength\belowdisplayskip{#1}\begin{align*} #2 \end{align*}\endgroup\noindent}
\newcommand{\mnp}[2]{\begin{minipage}{#1}#2\end{minipage}} 
%% COLOR DEFS------------------------------------------
\newtheorem{thm}{Theorem}
\newtheorem{cor}{Corollary}
\newtheorem{lem}{Lemma}
\newtheorem{prop}{Proposition}
\newtheorem{defn}{Definition}
\newtheorem{exmpl}{Example}
\newtheorem{rem}{Remark}
\newtheorem{notn}{Notation}
%% ------------PROOF INCLUSION -----------------
% #############################################################
% \usepackage{pnastwoF}      
\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\expect}{\mathbf{E}}
\DeclareMathOperator*{\var}{\mathbf{Var}}
%\usepackage[linesnumbered,ruled,vlined,noend]{algorithm2e}
%\newcommand{\captionN}[1]{\caption{\color{darkgray} \sffamily \fontsize{9}{10}\selectfont #1  }}
% ###################################
\newcommand{\xtitaut}[2]{
  \noindent\mnp{\textwidth}{
    \mnp{\textwidth}{\raggedright\Huge \bf \sffamily #1}

    \vskip 1em

    {\bf \sffamily #2}
  }
  \vskip 2em
}
% ###################################
% ###################################
\newcolumntype{L}[1]{>{\rule{0pt}{2ex}\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\rule{0pt}{2ex}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\rule{0pt}{2ex}\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\newcommand{\R}{\mathbb{R}} % Set of real numbers
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.pathreplacing,shapes.misc}
\usepgfplotslibrary{fillbetween}
%usepackage{tikz-network}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{math}
%\usepackage{textcomp}
\usepackage{colortbl}
%\usepackage{courier} 
\usepackage{pifont}
\usetikzlibrary{chains,backgrounds}
\usetikzlibrary{intersections}
\usetikzlibrary{pgfplots.groupplots}
\usepgfplotslibrary{fillbetween} 
\usetikzlibrary{arrows.meta}
\usepackage{pgfplotstable}
\usetikzlibrary{math}
\usetikzlibrary{matrix}
\usepackage{xstring}
\usepackage{xspace}
\usepackage{flushend}

\tikzexternaldisable
\def\COLA{black}
\newif\iftikzX
\tikzXtrue
\tikzXfalse
\newif\ifFIGS 
\FIGSfalse  
\def\moca{MoCA\xspace}
\def\zcor{ZeBRA\xspace}
\def\pcor{ZCoR\xspace}
\def\ICD{ICD-10\xspace}
\def\DISEASE{ADRD\xspace}
\gdef\mcor{MCoR\xspace}
% --- deterministic, high-separation colors using dvipsnames ---
\newcommand{\getcolor}[1]{%
  \ifnum\pdfstrcmp{#1}{A}=0 Red\fi
  \ifnum\pdfstrcmp{#1}{B}=0 RoyalBlue\fi
  \ifnum\pdfstrcmp{#1}{C}=0 ForestGreen\fi
  \ifnum\pdfstrcmp{#1}{D}=0 BurntOrange\fi
  \ifnum\pdfstrcmp{#1}{E}=0 Magenta\fi
  \ifnum\pdfstrcmp{#1}{F}=0 TealBlue\fi
  \ifnum\pdfstrcmp{#1}{G}=0 Violet\fi
  \ifnum\pdfstrcmp{#1}{H}=0 Goldenrod\fi
  \ifnum\pdfstrcmp{#1}{I}=0 Turquoise\fi
  \ifnum\pdfstrcmp{#1}{J}=0 Maroon\fi
  \ifnum\pdfstrcmp{#1}{K}=0 OliveGreen\fi
  \ifnum\pdfstrcmp{#1}{L}=0 Cerulean\fi
  \ifnum\pdfstrcmp{#1}{M}=0 BrickRed\fi
  \ifnum\pdfstrcmp{#1}{N}=0 SeaGreen\fi
  \ifnum\pdfstrcmp{#1}{O}=0 Purple\fi
  \ifnum\pdfstrcmp{#1}{P}=0 Dandelion\fi
  \ifnum\pdfstrcmp{#1}{Q}=0 NavyBlue\fi
  \ifnum\pdfstrcmp{#1}{R}=0 LimeGreen\fi
  \ifnum\pdfstrcmp{#1}{S}=0 RubineRed\fi
  \ifnum\pdfstrcmp{#1}{T}=0 CadetBlue\fi
}


\newcommand{\getmark}[1]{%
  \ifnum\pdfstrcmp{#1}{A}=0 *\fi
  \ifnum\pdfstrcmp{#1}{B}=0 square*\fi
  \ifnum\pdfstrcmp{#1}{C}=0 triangle*\fi
  \ifnum\pdfstrcmp{#1}{D}=0 diamond*\fi
  \ifnum\pdfstrcmp{#1}{E}=0 pentagon*\fi
  \ifnum\pdfstrcmp{#1}{F}=0 star\fi
  \ifnum\pdfstrcmp{#1}{G}=0 *\fi
  \ifnum\pdfstrcmp{#1}{H}=0 square*\fi
  \ifnum\pdfstrcmp{#1}{I}=0 triangle*\fi
  \ifnum\pdfstrcmp{#1}{J}=0 diamond*\fi
  \ifnum\pdfstrcmp{#1}{K}=0 *\fi
  \ifnum\pdfstrcmp{#1}{L}=0 square*\fi
  \ifnum\pdfstrcmp{#1}{M}=0 triangle*\fi
  \ifnum\pdfstrcmp{#1}{N}=0 diamond*\fi
  \ifnum\pdfstrcmp{#1}{O}=0 pentagon*\fi
  \ifnum\pdfstrcmp{#1}{P}=0 star\fi
  \ifnum\pdfstrcmp{#1}{Q}=0 *\fi
  \ifnum\pdfstrcmp{#1}{R}=0 square*\fi
  \ifnum\pdfstrcmp{#1}{S}=0 triangle*\fi
  \ifnum\pdfstrcmp{#1}{T}=0 diamond*\fi
}

\newcommand{\getlabel}[1]{%
  \ifnum\pdfstrcmp{#1}{A}=0 Infectious \& parasitic diseases\fi
  \ifnum\pdfstrcmp{#1}{B}=0 Infectious \& parasitic diseases\fi
  \ifnum\pdfstrcmp{#1}{C}=0 Malignant neoplasms\fi
  \ifnum\pdfstrcmp{#1}{D}=0 Blood disorders \& benign neoplasms\fi
  \ifnum\pdfstrcmp{#1}{E}=0 Endocrine, nutritional, metabolic\fi
  \ifnum\pdfstrcmp{#1}{F}=0 Mental \& behavioural disorders\fi
  \ifnum\pdfstrcmp{#1}{G}=0 Nervous system diseases\fi
  \ifnum\pdfstrcmp{#1}{H}=0 Eye, ear diseases\fi
  \ifnum\pdfstrcmp{#1}{I}=0 Circulatory system diseases\fi
  \ifnum\pdfstrcmp{#1}{J}=0 Respiratory diseases\fi
  \ifnum\pdfstrcmp{#1}{K}=0 Digestive system diseases\fi
  \ifnum\pdfstrcmp{#1}{L}=0 Skin \& subcutaneous tissue diseases\fi
  \ifnum\pdfstrcmp{#1}{M}=0 Musculoskeletal diseases\fi
  \ifnum\pdfstrcmp{#1}{N}=0 Genitourinary diseases\fi
  \ifnum\pdfstrcmp{#1}{O}=0 Pregnancy \& childbirth\fi
  \ifnum\pdfstrcmp{#1}{P}=0 Perinatal conditions\fi
  \ifnum\pdfstrcmp{#1}{Q}=0 Congenital malformations\fi
  \ifnum\pdfstrcmp{#1}{R}=0 Symptoms, signs, and abnormal findings\fi
  \ifnum\pdfstrcmp{#1}{S}=0 Injuries to body regions\fi
  \ifnum\pdfstrcmp{#1}{T}=0 Injuries, poisoning, external causes\fi
  \ifnum\pdfstrcmp{#1}{Z}=0 Factors influencing health status\fi
}
\renewcommand{\R}{\mathbb{R}}
\newcommand{\indep}{\perp\!\!\!\perp}
\newcommand{\SPOR}{\textrm{$\lambda$-OR}}
\newcommand{\COR}{\operatorname{OR}}
\newcommand{\logor}{\log\SPOR}
\newcommand{\clogor}{\log\COR}
\newcommand{\E}{\mathbb{E}}
\newcommand{\AUC}{\operatorname{AUC}}


\usepackage{booktabs,multirow}
\usepackage{siunitx}
\sisetup{
  round-mode=places,
  round-precision=4,
  detect-all
}
